<?php
namespace app\index\controller;

use app\common\service\CheckService;
use app\common\utils\ResultVOUtil;
use app\common\enums\ResultEnum;
use think\Request;


class Check {
    protected $checkService;
    
    public function __construct(CheckService $checkService)
    {
        $this->checkService = $checkService;
    }
    
    public function index(Request $request) {
        $param = $request->param();
        if(!empty($param)){
             $data = $this->checkService->check($param);
            
            if($data){
                return ResultVOUtil::success("");
            }else {
                return ResultVOUtil::error(ResultEnum::ChECK_ERROR);
            }
        }
        
    }
}